#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, ans, a[100005];
queue<int> q;
signed main()
{
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  freopen("duel.in", "r", stdin);
  freopen("duel.out", "w", stdout);
  cin >> n;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  sort(a + 1, a + n + 1);
  q.push(a[1]);
  for (int i = 2; i <= n; i++)
  {
    if (a[i] > q.front())
      q.pop(), ans++;
    q.push(a[i]);
  }
  cout << n - ans;
  exit(0);
}
